package com.intct.flink;

import com.intct.hbase.bean.Book;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author gufg
 * @since 2025-06-26 15:48
 */
public class HBaseDemo {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        env.fromElements(
                new Book(1, "老人与海", "张三", 56.66, 10),
                new Book(2, "活着", "李四", 76.66, 20),
                new Book(3, "飞鸟", "王五", 56.66, 5)
                ).addSink(new HBaseSinkFunc());
        env.execute();
    }
}
